Skip to content

Restructure CHODE into modular package with full feature suite - #1

Merged
chchchadzilla merged 3 commits into
mainfrom
claude/funny-thompson-bxkcf8
Oct 13, 2026
Merged

chchchadzilla merged 3 commits into
mainfrom
claude/funny-thompson-bxkcf8

Conversation

@chchchadzilla

Copy link
Copy Markdown
Owner

Summary

This is a major restructuring that transforms CHODE from a single-file script into a fully-featured, modular Python package with comprehensive tooling for AI-assisted development. The codebase is reorganized into logical modules, the website is simplified, and extensive documentation and testing infrastructure are added.

Key Changes

Core Architecture

  • Package restructuring: Converted monolithic chode.py into a proper chode/ package with 30+ focused modules
  • Module organization:
    • agent.py — agent loop and system prompt generation
    • llm.py — unified LLM client supporting Anthropic, OpenAI-compatible, and Plan Bridge
    • tools.py — built-in tool definitions and executors (file I/O, bash, web, git, etc.)
    • memory.py — persistent memory with instruction files, episodic storage, and session transcripts
    • skills.py — portable SKILL.md folder system compatible with Claude Code/Codex
    • permissions.py — permission modes and dangerous-command guards
    • security.py — secret redaction, path guards, SSRF protection, secret scanning
    • config.py — provider configuration, pricing, and config load/save
    • rag.py — local codebase indexing with BM25 and optional dense embeddings
    • order.py — ORDER system for project auditing, scaffolding, and backups
    • publish.py — git integration, commit messages, releases, GitHub/HF publishing
    • plans.py — Plan Bridge for riding vendor CLIs as CHODE's model
    • importer.py — one-click import from VS Code, Cursor, Claude Code, Codex, etc.
    • mcp.py — MCP (Model Context Protocol) client with stdio and HTTP transports
    • mcp_server.py — CHODE as an MCP server for other tools
    • hooks.py — lifecycle hooks around CHODE's actions
    • session.py — checkpoints and session persistence
    • repl.py — chat REPL wiring UI, agent loop, memory, and publishing
    • commands.py — slash commands and custom .md commands
    • menu.py — launch menu with provider/model selection
    • wizard.py — interactive setup and import flows
    • doctor.py — environment audit and live health checks
    • conscience.py — safety stance and ledger of risky moments
    • banner.py — banner and icon generation (SVG/PNG)
    • gui.py — browser-based GUI using Server-Sent Events
    • ui.py — terminal UI with colors, spinner, markdown renderer, menus
    • cli.py — command-line entry point
    • paths.py — centralized path management
    • state.py — shared runtime state
    • __init__.py / __main__.py — package initialization

Features Added

  • Multi-provider support: Anthropic, OpenAI, DeepSeek, Google Gemini, xAI Grok, Ollama, LM Studio, OpenRouter, Azure
  • Plan Bridge: Ride vendor CLIs (claude, codex, gemini) without API keys
  • One-click import: Migrate rules, skills, commands, agents, MCP servers, and permissions from VS Code, Cursor, Claude Code, Codex, Windsurf, Cline, and 15+ other tools
  • ORDER system: Automatic project auditing, scaffolding, backups, and documentation
  • Local RAG: BM25 codebase indexing with optional dense embeddings
  • MCP integration: Both client and server modes for Model Context Protocol
  • Browser GUI: Zero-dependency web interface with Server-Sent Events
  • Security: Secret redaction, SSRF guards, dangerous-command confirmation, ledger tracking
  • Persistent memory: Instruction files, episodic memory, session transcripts
  • Skills system: Portable SKILL.md folders compatible with other agents
  • **Hooks

https://claude.ai/code/session_01TZ7NjtFH1yYCc1VKAJuGFg

Chad Keith and others added 3 commits October 12, 2026 21:01
…, memory, RAG, Deck GUI

Grow CHODE from a single 2,900-line file into a proper package with twelve new
feature areas, a 60-test offline suite, CI, a browser GUI and a real brand.

- Package: chode/ (cli, repl, commands, agent, tools, permissions, llm, mcp, ui,
  config, paths, security, session, skills, state, wizard, doctor, menu) with
  pyproject.toml, `chode` console script, python -m chode, install.sh/.ps1.
- Plan Bridge: claude-plan / codex-plan / gemini-plan / custom-plan providers drive
  the vendor CLIs with CHODE mounted as an MCP server (chode mcp-serve);
  `chode ride <cli>` for interactive handoff.
- The Gulp (chode import): one-click import of rules, skills, commands, agents,
  MCP servers, permissions and hooks from 20+ coding agents, secrets stripped.
- ORDER: 17-check repo audit with a 0-100 score, deterministic scaffold, model-
  written README/ABOUT.md/tests via the repo-order skill, rotating backups, tidy.
- Persistent memory (instruction files + episodic store + reflection), conscience
  file + risk ledger, local BM25 RAG with optional embeddings, hooks (Claude Code
  format compatible), sub-agents with personas.
- Publish: /ship (secret scan, model-written commit, push, repo creation),
  autocommit, /release, Hugging Face uploads. Banner/icon generator.
- The Deck: zero-dependency browser GUI (http.server + SSE, localhost + token).
- Streaming for Anthropic and OpenAI-style APIs with live markdown, status line,
  @file completion, /diff, /git; hardened security (chained-command allow-listing,
  deny lists, SSRF guard, injection detection, chmod 600 config).
- Docs: rebuilt README with banner + badges, ABOUT.md, CHANGELOG, CONTRIBUTING,
  SECURITY, CHODE.md, docs/, GitHub Pages landing page.
- Removed generate_album_cover.py (contained a hard-coded API key fragment and
  unrelated content) and the personal site assets.

Co-Authored-By: Claude Mythos 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TZ7NjtFH1yYCc1VKAJuGFg
…ly built wheel

Workflows now run only from the Actions tab (workflow_dispatch), so pushes never
spend Actions minutes or show failing checks. README swaps the Actions badge for
a static tests badge and documents the manual release path.

Co-Authored-By: Claude Mythos 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TZ7NjtFH1yYCc1VKAJuGFg
@chchchadzilla
chchchadzilla merged commit 271cd34 into main Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant